package com.magnificent.atlantis.client.ui.creator.dialogs;

/**
 * User: Babanin
 * Date: 10.02.2009
 * Time: 22:59:36
 */
public abstract class DialogConnector<T> {

    private boolean closeBeforeSelect;

    protected DialogConnector() {
        closeBeforeSelect = true;
    }

    protected DialogConnector(boolean closeBeforeSelect) {
        this.closeBeforeSelect = closeBeforeSelect;
    }

    public abstract boolean objectSelected(T obj);

    public boolean isCloseBeforeSelect() {
        return closeBeforeSelect;
    }

    public boolean cancelPressed() {
        return true;
    }
}
